package com.zjsru.controller;

import com.zjsru.Service.OrdersService;
import com.zjsru.domain.Orders;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequiredArgsConstructor
@RequestMapping("orders")
public class OrdersController {
    private final OrdersService ordersService;
    @RequestMapping("findAll")
    public List<Orders> findAll() {
        return ordersService.queryAll();
    }
}
